package collection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class LambdaDemo {
    public static void main(String[] args) {
        Zoo zoo = () -> System.out.println("写毕业论文");
        zoo.say();
        List<String> list = new ArrayList<>();
        list.add("写毕业论文");
        list.add("忙毕业论文");
        list.add("回上海考试");
        list.add("学完找工作");
        System.out.println(list);
        Collections.sort(list, (String o1, String o2) -> (o1.length() - o2.length()));
        System.out.println(list);
    }

}
interface Zoo{
    void say();
    }
